package com.zy.cat.entity.ad;


import java.util.UUID;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Index;
import javax.persistence.Table;

import org.springframework.util.DigestUtils;

import com.zy.cat.entity.primary.CatAppAdPrimary;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @info 9趣猫广告开关控制类
 * @author Link
 * @date 2019-10-30 09:14
 */
@Entity
@Table(name = "zy_cat_app_ads", indexes = {
		@Index(name = "aid", columnList = "aid"),
		@Index(name = "cid", columnList = "cid"),
		@Index(name = "vscode", columnList = "vscode"),
		@Index(name = "ctype", columnList = "ctype"),
 		@Index(name = "astatus", columnList = "astatus")})
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("9趣猫广告开关控制类")
@IdClass(CatAppAdPrimary.class)
public class CatAppAd {
	@Column(columnDefinition = "VARCHAR(10) NOT NULL COMMENT '9趣猫广告开关控制类实体类,广告ID'")
	@ApiModelProperty(value = "广告ID", example = "fe53d6a4fa29641")
	private String aid;
	
	@Id
	@Column(columnDefinition = "VARCHAR(50) NOT NULL  COMMENT '渠道号'")
	@ApiModelProperty(value = "渠道号", example = "2019-02-22 12:56:56")
	private String cid;
	
	@Id
	@Column(columnDefinition = "INT(2) DEFAULT '0' COMMENT '平台类型  0.安卓 ,1.IOS'")
	@ApiModelProperty(value = "平台类型  0.安卓 ,1.IOS", example = "0")
	private int ctype;
	
	@Id
	@Column(columnDefinition = "BIGINT(10) NOT NULL  COMMENT '版本号'")
	@ApiModelProperty(value = "版本号", example = "10010")
	private long vscode;
	
	@Column(columnDefinition = "VARCHAR(20) NOT NULL  COMMENT '渠道名称'")
	@ApiModelProperty(value = "渠道名称", example = "2019-02-22 12:56:56")
	private String cname;
	
	@Column(columnDefinition = "VARCHAR(30) NOT NULL COMMENT '版本名'")
	@ApiModelProperty(value = "版本名", example = "")
	private String vsname;
	
	@Column(columnDefinition = "INT(2) DEFAULT '0' COMMENT '状态 ：0.关闭 1.开启'")
	@ApiModelProperty(value = "状态 ：0.关闭 1.开启", example = "0")
	private int astatus;
	
	@Column(columnDefinition = "VARCHAR(20) NOT NULL  COMMENT '创建时间'")
	@ApiModelProperty(value = "创建时间", example = "2019-02-22 12:56:56")
	private String ctime;
	
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '最后更新时间'")
	@ApiModelProperty(value = "最后更新时间", example = "2019-02-22 10:10:10")
	private String ltime;
 
}
